import React from 'react';
import ReactDOM from 'react-dom';

import {createHashHistory} from 'history';

import {Router, Route, useRouterHistory} from 'react-router'

import {syncHistoryWithStore,RouterStore} from 'mobx-react-router';

import {Provider} from 'mobx-react';


import FnaSpecial from 'weaFnaSpecial'
import ComMobx from 'comsMobx'


const routing = new RouterStore();

const allStore = {
  // Key can be whatever you want
  routing:routing,
  ...FnaSpecial.store,
  ...ComMobx.store,
}

const fnaRoute = FnaSpecial.Route;

const browserHistory = useRouterHistory(createHashHistory)({
  queryKey: '_key',
  basename: '/'
});

const history = syncHistoryWithStore(browserHistory, allStore.routing);

const Home = props => props.children;

class Root extends React.Component {
  render() {
    return (
      <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@sz73f4`} {...allStore}>
        <Router ecId={`${this && this.props && this.props.ecId || ''}_Router@jug6ns`} history={history}>
          <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@cur5xy`} name="main" breadcrumbName="入口" path="/main" component={Home}>
            {fnaRoute}
          </Route>
        </Router>
      </Provider>
    )
  }
}

ReactDOM.render(<Root ecId={`${this && this.props && this.props.ecId || ''}_Root@tovryd`}/>, document.getElementById('container'));
module.exports = FnaSpecial;